package com.example.mqtt.base;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum MqttSubTopic {
    EVENT(MqttShare.SHARE, "+/mqtt/event/+", 0),
    CONNECTED(MqttShare.SHARE, "$SYS/brokers/+/clients/+/+", 0);
    private final MqttShare shareType;
    @Getter
    private final String topic;
    @Getter
    private final int qos;

    public String getShareTopic() {
        return shareType.getPrefix().concat(topic);
    }
}
